<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Google Earth toolbox - ge_contour</title>
  <meta name="keywords" content="ge_contour">
  <meta name="description" content="Visualizing contour maps in Google Earth">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="robots" content="index, follow">
  <meta author="Jurriaan H. Spaaks">
  <meta author="Scott L. Davis">
  <link type="text/css" rel="stylesheet" href="styles/ge_styles.css">
</head>

<body>
<a name="_top"></a>

<div class="linkheader">

<a href="matlab:edit(&#0039;ge_contour&#0039;)">View source code of the function ge_contour() in the MATLAB editor</a><br>
<a href="contents.html">Google Earth toolbox contents</a></p>
</div>

<div class="header"><h1 class="code">ge_contour</h1></div>
<div class="text"><p>Visualizing contour maps in Google Earth.</p></div>
<div class="spacer"></div>
<div class="header"><h1>Syntax<a href="#_top"><img alt="go to top" border="0" margin="6" valign="top" align="right" src="images/up.png"></a></h1></div>
<div class="text"><table>
             <tr><td class="code" nowrap>kmlStr = ge_contour(X,Y,M)</td></tr>
             <tr><td class="code" nowrap>kmlStr = ge_contour(X,Y,M,Parameter,Value)</td></tr></table></div>
<div class="spacer"></div>
<div class="header"><h1>Description<a href="#_top"><img alt="go to top" border="0" margin="6" valign="top" align="right" src="images/up.png"></a></h1></div>
<div class="text"><table><tr><td class="code" nowrap>kmlStr = ge_contour(X,Y,M)</td></tr></table></div>

<div class="text"><p>Visualizing contour maps in Google Earth. &quot;X&quot; contains the location longitudes whereas &quot;Y&quot; contains the location latitudes of the data in the 2D numerical array &quot;M&quot;. &quot;M&quot; should at least be 2x2. Both &quot;X&quot; and &quot;Y&quot; must be monotonically increasing. &quot;X&quot; must be a vector of length size(M,2); &quot;Y&quot; must be a vector of length size(M,1).</p></div>
<div class="text"><table><tr><td class="code" nowrap>kmlStr = ge_contour(X,Y,M,Parameter,Value)</td></tr></table></div>
<div class="text"><p>In addition to the above, a number of options can be set regarding the appearance of the contourmap. Assigning values to the parameters can be accomplished by inclusion of an alternating sequence of parameters and their value. The table below provides an overview of the authorized options. The order in which the parameters are included does not matter. Please be aware that the options are case-sensitive. Examples are provided further down.</p></div>
<div class="par-val-div"><table>
                    <tr><td nowrap><b>Parameter</b></td><td nowrap><b>Description</b></td></tr>
                    <tr><td class="code" nowrap>'altitude'</td><td>Height difference relative to the plane of reference (see parameter &#0039;altitudeMode&#0039;).</td></tr>
                    <tr><td class="code" nowrap>'altitudeMode'</td><td>Specifies which plane of reference to use. Must be one of &#0039;absolute&#0039;, &#0039;relativeToGround&#0039; or &#0039;clampToGround&#0039;.</td></tr>
                    <tr><td class="code" nowrap>&#0039;cLimHigh&#0039;</td><td>Specifies the value to which the maximum of the colorbar should apply. Default is max(M(:)).</td></tr>
                    <tr><td class="code" nowrap>&#0039;cLimLow&#0039;</td><td>Specifies the value to which the minimum of the colorbar should apply. Default is min(M(:)).</td></tr>
                    <tr><td class="code" nowrap>&#0039;cMap&#0039;</td><td>Specifies the colormap to use for visualizing the grid cell colors. Default is &#0039;jet&#0039;, but any MATLAB colormap can be used.</td></tr>
                    <tr><td class="code" nowrap>'description'</td><td>A description of objects can be included using this parameter. Its value must be passed as a character array. It will be displayed in the Google Earth Viewer within a pop-up text balloon.</td></tr>
                    <tr><td class="code" nowrap>'extrude'</td><td>See <a href="extrude.html">Extruding objects</a>.</td></tr>
                    <tr><td class="code" nowrap>'forceAsLine'</td><td>When lines do not end at the location where they started, they are sometimes automatically connected by the OpenGL renderer when displayed in the Google Earth Viewer. By setting this parameter to true, this is avoided by plotting lines from start to end and back. This will force all lines to end at their starting point. Note that this will increase file size. Default is true.</td></tr>
                    <tr><td class="code" nowrap>'lineAlpha'</td><td>When no line color is specified, the function assigns colors to each contour line individually. The &#0039;lineAlpha&#0039; parameter can be used to set its transparency.</td></tr>
                    <tr><td class="code" nowrap>'lineColor'</td><td>Line color specification, including transparency. Color value format must be passed as a character array according to the format string 'TTRRGGBB', with 'TT' representing transparency; 'RR', 'GG', and 'BB' representing red, green, and blue colors, respectively. Intensity values are denoted as two-digit hexadecimal numbers ranging from 00 to FF. For example, '80FF0000' is semi-transparent red and 'FF0000FF' is fully opaque blue.</td></tr>
                    <tr><td class="code" nowrap>'lineWidth'</td><td>Width of the contour lines.</td></tr>
                    <tr><td class="code" nowrap>'lineValues'</td><td>Nx1 vector whose length will be the number of contour line levels, and whose values are the level values.  (Not to be used in conjuction with parameter 'numLevels')</td></tr>
                    <tr><td class="code" nowrap>&#0039;msgToScreen&#0039;</td><td>Defines whether verbose feedback is provided by the function when it is accessed and when it finishes. Default is false (which is equivalent to logical(0), but quicker). </td></tr>
                    <tr><td class="code" nowrap>'name'</td><td>This character array will be used within the Google Earth Viewer &#0039;Places&#0039; pane to identify objects.</td></tr>
                    <tr><td class="code" nowrap>'numLevels'</td><td>Number of contour levels to use.  Default is auto generated.</td></tr>
                    <tr><td class="code" nowrap>'snippet'</td><td>A short description of the feature. In Google Earth, this description is displayed in the Places panel under the name of the feature. If a Snippet is not supplied, the first two lines of the description are used</td></tr>
                    <tr><td class="code" nowrap>'tessellate'</td><td>See <a href="tessellate.html">Tessellation</a>.</td></tr>
<!--                    <tr><td class="code" nowrap>'timeStamp'</td><td>See <a href="timestamp.html">timeStamp, timeSpanStart and timeSpanStop</a>.</td></tr>-->
                    <tr><td class="code" nowrap>'timeSpanStart'</td><td>See <a href="timestamp.html">Dynamic visualization</a>.</td></tr>
                    <tr><td class="code" nowrap>'timeSpanStop'</td><td>See <a href="timestamp.html">Dynamic visualization</a>.</td></tr>
                    <tr><td class="code" nowrap>'visibility'</td><td>Whether the object is initially visible. Must be passed to ge_contour() as a numerical value 1 or 0. Visibility state can be changed within the Google Earth Viewer by clicking the object&#0039;s checkmark in the &#0039;Places&#0039; pane.</td></tr>

                             
</table></div>
<div class="spacer"></div>

<div class="header"><h1>Remarks<a href="#_top"><img alt="go to top" border="0" margin="6" valign="top" align="right" src="images/up.png"></a></h1></div>
<div class="text"><p>Latitudes on the Southern hemisphere must be passed as negative values. Same for longitudes on the Western hemisphere.</p>
<p>Latitudes and longitudes should be passed in units of decimal degrees (also known as fractional degrees). Google Earth uses Simple Cylindrical projection (also known as Plate Car&#233;e) with a WGS84 datum.</p>
</div>
<div class="spacer"></div>

<div class="header"><h1>Examples<a href="#_top"><img alt="go to top" border="0" margin="6" valign="top" align="right" src="images/up.png"></a></h1></div>
<div class="text">
   <p><a href="matlab:edit(url_from_folder('demo','demo_ge_contour.m'))">demo_ge_contour</a> provides an example of the use of ge_contour(). It will generate a *.kml file that looks like the image below when opened in the Google Earth viewer.</p>
   <p><img src="images/ge_contour_example.png"></p>
</div>
<div class="spacer"></div>


<div class="footer">
<hr>
<a name="_bottom"></a></div>
</body>
</html>
